Current flowing through a wire will produce a magnet field. The right hand rule, shown by FIG. 1(a), illustrates the relationship between the direction current flows in a wire and the direction of the magnetic field it creates wrapping around the wire. This phenomenon can be used to create motion by placing the wire next to a permanent magnet and allowing the magnetic forces to push or pull one another. Referring to FIG. 1B, it can be seen that by wrapping the wire into a coil the magnetic field becomes stronger on the inside where it converges and weaker on the outside where it diverges.
Most direct current (DC) electric motors with rotary motion are designed such that the permanent magnet moves outside the convergent area of the coil. FIG. 2 shows a typical rotary DC motor configuration 1. However, only one side of a coil 2 and only one side of magnets 31 and 32 does the pushing or pulling to induce rotation about an axle 33. Motors need to switch/commutate (i.e., reverse) the direction of the magnetic field to maintain continuous motion. Brushless DC motors typically use a sensor to detect the rotor position with respect to the stator and electric circuitry to switch the direction the motor current is flowing. Brushed DC motors do this mechanically by contacting the coil leads (i.e., brushes) with a commutator, which provides positive or negative power depending on the axial position of the leads.
Different motors can be compared based on the efficiency with which electrical power is converted to mechanical torque, torque range, power range and mass, as well as their cost of production and reliability.